import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { Assembly } from '../fb-design.model';

@Component({
    selector: 'fb-dynamic-attributes',
    templateUrl: './fb-dynamic-attributes.component.html',
    styleUrls: ['./fb-dynamic-attributes.component.scss'],
    providers: [  ]
})
export class FbDynamicAttributesComponent implements OnInit {
    @Input() assembly: Assembly;
    @Input() form: FormGroup;
    @Input() names: string[];

    get isValid() { return this.form.controls[this.assembly.name].valid; }
    
    ngOnInit() {   
    }
}
